package com.vhall.component.service.rbac;


import com.vhall.component.entity.rbac.GroupAccessEntity;
import com.vhall.component.entity.rbac.vo.GroupAddAccessReqVO;
import com.vhall.component.entity.rbac.vo.GroupDeleteAccessReqVO;

import java.util.List;

/**
 * @author dalong
 * @date 2021-05-10 18:12
 */
public interface RbacGroupAccessService {

    /**
     * 获取分组权限列表
     *
     * @param groupId 分组id
     * @param appId   应用id
     * @return
     */
    List<GroupAccessEntity> getListByGroupIdAppId(Integer groupId, String appId);

    /**
     * 为组添加权限
     *
     * @param reqVO
     * @return
     */
    boolean addGroupAccess(GroupAddAccessReqVO reqVO);

    /**
     * 删除组权限
     *
     * @param reqVO
     * @return
     */
    boolean deleteGroupAccess(GroupDeleteAccessReqVO reqVO);

    /**
     * 获取群组权限
     *
     * @param groupId
     * @param accessId
     * @return
     */
    GroupAccessEntity getInfoByGroupIdAccessId(Integer groupId, Integer accessId);

    /**
     * 查询分组权限
     *
     * @param groupId
     * @param status
     * @return
     */
    GroupAccessEntity getInfoByGroupStatus(Integer groupId, Integer status);

}
